<core:SET users="users">
<core:SET title="Administrators accounts management">
<core:WRAP file="/adm/adm.layout.html" placeholder="Content">

<core:include file="/adm/inc/inc.adm.tabs.html">

<h1 align="center"> </h1>

<form id="UserForm" name="UserForm" method="post" action="" runat="server">
<core:optional for="msg">
	<span class="small" runat="server"> {$msg} </span>
</core:optional>
	<hr>
  <table width="100%" border="0" align="center" cellspacing="1" cellpadding="2">
    <colgroup>
        <col id="firstname">
        <col id="lastname">
        <col id="username">
        <col id="email">
        <col id="status">
        <col id="action">
    </colgroup>
    <tr align="left">
    	<td colspan="3" class="whiteheader">
    		Manage admin users: user -
            	<core:default for="user_id"> &lt; None &gt;
            	</core:default>
            	<core:optional for="user_id"> {$login} ({$user_id}) &nbsp;
            	</core:optional>
    	</td>

<!--<core:default for="user_id"> -->
<list:LIST id='List'>
        <td colspan="3" class="whiteheader_right" align="right">
            <page:navigator id="pagenav" items="10">
				Page: {$PageNumber} of {$TotalPages}
    			<page:first>First</page:first>
    			<page:prev>Prev</page:prev>
    			<page:list>
        			<page:number>
        			<page:elipses>...</page:elipses>
        			<page:separator> </page:separator>
    			</page:list>
    			<page:next>Next</page:next> <page:last>Last</page:last>
			</page:navigator>
    	</td>
     </tr>

    <tr class="header">
        <th>First name</th>
        <th>Last name</th>
        <th>Username</th>
        <th>Email</th>
        <th>Status</th>
        <th> &nbsp; </th>
    </tr>
    <list:ITEM>
      <tr class="{$Parity}">
        <td>{$firstname}</td>
        <td>{$lastname}</td>
        <td>{$login}</td>
        <td>{$email}</td>
        <td>
        	<core:optional for="active_show"> Active
        	</core:optional>
            <core:default for="active_show"> Deactivated
        	</core:default>
        </td>

        <td class="left">
        	<html:link url="/delete" param="user_id">Delete</html:link>
        	<html:link url="/edit" param="user_id">Edit</html:link>
            <core:optional for="active_show">
             	<html:link url="/deactivate" param="user_id">Deactivate</html:link>
        	</core:optional>
        	<core:default for="active_show">
        		<html:link url="/activate" param="user_id">Activate</html:link>
            </core:default>

        </td>
      </tr>
    </list:ITEM>
    <tr> <td colspan="6" class="whiteheader"> &nbsp; </td> </tr>
  </table>
</list:LIST>
<!--</core:default>   -->

<hr>




<table width="100%" border="0" align="center" cellspacing="2" cellpadding="3">
    <tr align="left">
    	<td colspan="2" class="whiteheader_center">
    		Please, enter user details
    	</td>
     </tr>

    <core:default for="supress_errors">
    <ERRORSUMMARY id='Summary' runat="server">
        <tr valign="top">
          <td width="20%">Errors: &nbsp;</td>
          <td width="80%" class="left">
          	<FONT COLOR="RED">
          		<list:ITEM> {$ErrorMessage} &nbsp; </list:ITEM>
          	</FONT>
          </td>
        </tr>
     </ERRORSUMMARY>
     </core:default>

	<input name="user_id" type="hidden" id="user_id" runat="server">
	<input name="page" type="hidden" id="page" runat="server">

    <tr valign="top">
      <td class="form_label" width="20%"><label for="login" runat="server">Username</label></td>
      <td class="form_field" width="80%"><input name="login" type="text" id="login" size="32" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="20%"><label for="firstname" runat="server">First name</label></td>
      <td class="form_field" width="80%"><input name="firstname" type="text" id="firstname" size="64" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="20%"><label for="lastname" runat="server">Last name</label></td>
      <td class="form_field" width="80%"><input name="lastname" type="text" id="lastname" size="64" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="20%"><label for="password" runat="server">Password</label></td>
      <td class="form_field" width="80%"><input name="password" type="text" id="password" size="32" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="20%"><label for="email" runat="server">Email</label></td>
      <td class="form_field" width="80%"><input name="email" type="text" id="email" size="64" runat="server"></td>
    </tr>

    <tr align="left">
    	<td colspan="2" class="whiteheader_center"> &nbsp;
    	</td>
     </tr>
    <tr>
      <td>&nbsp;</td>
      <td class="form_field">
      		<core:default for="user_id">
      			<input type="submit" name="create" value="Create" runat="server">
            </core:default>
            <core:optional for="user_id">
      			<input type="submit" name="save" value="Save" runat="server">
                <!--<input type="submit" name="delete" value="Delete" runat="server">-->
                <core:default for="active_show">
                	<input type="submit" name="activate" value="Activate" runat="server">
                </core:default>
                <core:optional for="active_show">
                	<input type="submit" name="deactivate" value="Deactivate" runat="server">
                </core:optional>
                <input type="submit" name="users" value="Back to users" runat="server">
            </core:optional>
            <input type="submit" name="clean" value="Clean" runat="server">

      </td>
    </tr>
</table>
<hr>
</form>